package com.thiswhyme.discovery.server2.v1.feign;

import com.thiswhyme.common.response.ResponseCode;
import com.thiswhyme.common.response.ResponseVo;
import com.thiswhyme.discovery.server2.v1.dto.UserDto;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by thiswhyme on 2020/9/3.
 */
@Service
public class UserFeignServiceFallback implements UserFeignService {

    @Override
    public ResponseVo<List<UserDto>> listUsers(String trace) {
        return ResponseVo.failure(ResponseCode.SYSTEM_EXCEPTION.getCode(), trace + " feign fallback");
    }

    @Override
    public ResponseVo<String> queryUserName(String trace) {
        return ResponseVo.failure(ResponseCode.SYSTEM_EXCEPTION.getCode(), trace + " feign fallback");
    }
}
